package server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import client.ContactListService;

import java.util.*;

/**
 * ContactListServiceImpl
 *
 * @author Masud Idris
 * @version 1.0
 * @since Dec 18, 2007, 9:56:47 PM
 */
public class ContactListServiceImpl extends RemoteServiceServlet implements ContactListService {

  /**
   * Method used to generate a list of contacts
   * @return  ArrayList containing a bunch of contacts
   */
  public ArrayList getContactList() {
    return Utils.generateContacts();
  }

  /**
   * Method used to echo a list of contacts. This method serves no real purpose other than to
   * demonstrate how to annotate a service method.
   *
   * @param listOfContacts  list of contacts to echo
   * @return  echoed contacts
   */
  public ArrayList echoContactList(ArrayList listOfContacts) {
    return listOfContacts;
  }

}